//按需加载
// const Foo = resolve => require(['./Foo.vue'], resolve)
//第一种方法
// import VueRouter from "vue-router";
// const home = resolve=>require(["./components/home/home.vue"],resolve);
// const news = resolve=>require(["./components/home/home_news.vue"],resolve);
// const share = resolve=>require(["./components/home/home_share.vue"],resolve);
// const goumai = resolve=>require(["./components/home/home_goumai.vue"],resolve);
// const goumai_pinglun = resolve=>require(["./components/home/goumai_delt.vue"],resolve);
// const news_getnew = resolve=>require(["./components/home/new_getnew.vue"],resolve);
// const pinglun = resolve=>require(["./components/home/getnew_pinglun.vue"],resolve);
// const car = resolve=>require(["./components/car/car.vue"],resolve);
// const share_xiang = resolve=>require(["./components/home/share_xiang.vue"],resolve);
// const huiyuan = resolve=>require(["./components/home/huiyuan.vue"],resolve);

//
import VueRouter from "vue-router";
import home from "./components/home/home.vue";
import news from "./components/home/home_news.vue";
import share from "./components/home/home_share.vue";
import goumai from "./components/home/home_goumai.vue";
import goumai_pinglun from "./components/home/goumai_delt.vue";
import news_getnew from "./components/home/new_getnew.vue";
import pinglun from "./components/home/getnew_pinglun.vue";
import car from "./components/car/car.vue";
import share_xiang from "./components/home/share_xiang.vue";
import huiyuan from "./components/home/huiyuan.vue";


const router = new VueRouter({
        routes:[
            {path:"/",redirect:{name:"home"}},
            {name:"home",path: "/home",component:home},
            {name:"home_news",path: "/home/news",component: news},
            {name:"news_getnew",path: "/news/getnew",component: news_getnew},
            {name:"home_share",path: "/home/share",component: share},
            {name:'share_xiang',path: '/home/share_xiang',component: share_xiang},
            {name:"goumai",path: "/home/goumai",component: goumai},
            {name:"goumai_detail",path: "/goumai/pinglun",component: goumai_pinglun},
            {name:"getnew_pinglun",path: "/getnews/pinglun",component: pinglun},
            {path: "/car", component: car},
            {name:"huiyuan",path:"home/huiyuan",component: huiyuan}
        ],
        linkActiveClass:"mui-active"
    })

export default router